package com.itheima.Day11.Zifu;

import java.io.FileWriter;

public class Zifu_writer {
    // 字符输入流 ：将程序中的文本写入到文件中
    //1.创建字符输入流对象，与文件建立输入流管道
    public static void main(String[] args) {
        try(
                FileWriter fw = new FileWriter("D:\\javajc_ws\\javaEE\\src\\com\\itheima\\Day11\\Zifu\\ceshi", true);
                ){
            fw.write("hello world");
            fw.write("\r\n");
            fw.write("hello world", 0,5);
            fw.write("\r\n");
            char[] chars = {'a','b','c'};
            fw.write(chars);

        }catch (Exception e){
            throw new RuntimeException(e);
        }

    }
}
